#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int money = 20;
	int bottle = money;
	int total = money;
	while (bottle >= 2)
	{
		int exchange = bottle / 2;
		total = total + exchange;
		bottle = exchange + bottle % 2  ;
	}
	printf("%d", total);
	return 0;
}